﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HM.DataAccessLayer;
using HM.DataAccessLayer.DTO;

namespace HM.Test
{
    class Program
    {
        private static  Players _player;
        private static string _playerName = "stef2001";
        private static string _server = "127.0.0.1";
        private static string _port = "5432";

        private static string _hmServerLogin = "postgres";
        private static string _hmServerPassword = "sql";
        private static string _hmDataBaseName = "HM_STEF_001";
        private static CoreReader _core;

      

        static void Main(string[] args)
        {
          _core = new CoreReader(_server, _port, _hmServerLogin, _hmServerPassword, _hmDataBaseName);

            _player = _core.GetPlayerByName(_playerName, PokerSites.Ps);
            if(_player==null)
                throw new Exception("Invalid PokerStars playername");

          Test1();
        }



        private static void Test1()
        {


            //HM.DataAccessLayer.DTO.PlayerStats stats1 = _core.GetPlayerStats(_player.player_id , DateTime.Now.AddDays(-2), DateTime.Now);
            //HM.DataAccessLayer.DTO.PlayerStats stats2 = _core.GetPlayerStats(_player.player_id, DateTime.Now.AddDays(-14), DateTime.Now);
            //HM.DataAccessLayer.DTO.PlayerStats stats3 = _core.GetPlayerStats(_player.player_id, DateTime.Now.AddDays(-3000), DateTime.Now);

            HM.DataAccessLayer.DTO.PlayerStats stats1 = _core.GetPlayerStats(PokerSites.Ps,_player.player_id, DateTime.Now.AddDays(-100), DateTime.Now);
            System.Diagnostics.Debug.WriteLine(string.Format("Vpip : {0}" ,stats1.SessionsDetailledStats[0].VPipPercent));


        }
    }
}
